//////////////////////////////////////////////////////////////////////////
// FileName:
// CreateBy:
// CreateDate:2010/5/25
// Description:
//		BusDailyChecking class
//
// Modify Log:
//
// Copyright:
/////////////////////////////////////////////////////////////////////////
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using Auto.Components;

namespace Auto.Data.BusMan.Model
{
    [Serializable]
    public class BusDailyChecking
    {
        #region --Field--
        ///<summary>
        ///Data Table Bus_BusDailyChecking
        ///</summary>
        public const string TABLENAME_Bus_BusDailyChecking = "Bus_BusDailyChecking";
        /// <sumary> 
        /// (RecID Type:Int Len:0) 
        /// </sumary> 
        public const string FIELD_RecID = "RecID";
        /// <sumary> 
        /// (DocID Type:VarChar Len:20) 
        /// </sumary> 
        public const string FIELD_DocID = "DocID";
        /// <sumary> 
        /// (BusID Type:VarChar Len:20) 
        /// </sumary> 
        public const string FIELD_BusID = "BusID";
        /// <sumary> 
        /// (CheckBy Type:NVarChar Len:20) 
        /// </sumary> 
        public const string FIELD_CheckBy = "CheckBy";
        /// <sumary> 
        /// (CheckDate Type:SmallDateTime Len:0) 
        /// </sumary> 
        public const string FIELD_CheckDate = "CheckDate";
        /// <sumary> 
        /// (SteeringWheel Type:NVarChar Len:200) 
        /// </sumary> 
        public const string FIELD_SteeringWheel = "SteeringWheel";
        /// <sumary> 
        /// (Brake Type:NVarChar Len:200) 
        /// </sumary> 
        public const string FIELD_Brake = "Brake";
        /// <sumary> 
        /// (Lamplight Type:NVarChar Len:200) 
        /// </sumary> 
        public const string FIELD_Lamplight = "Lamplight";
        /// <sumary> 
        /// (Tyre Type:NVarChar Len:200) 
        /// </sumary> 
        public const string FIELD_Tyre = "Tyre";
        /// <sumary> 
        /// (LoudSpeaker Type:NVarChar Len:200) 
        /// </sumary> 
        public const string FIELD_LoudSpeaker = "LoudSpeaker";
        /// <sumary> 
        /// (MachineFitter Type:NVarChar Len:200) 
        /// </sumary> 
        public const string FIELD_MachineFitter = "MachineFitter";
        /// <sumary> 
        /// (Wiper Type:NVarChar Len:200) 
        /// </sumary> 
        public const string FIELD_Wiper = "Wiper";
        /// <sumary> 
        /// (Extinguisher Type:NVarChar Len:200) 
        /// </sumary> 
        public const string FIELD_Extinguisher = "Extinguisher";
        /// <sumary> 
        /// (WarningBoard Type:NVarChar Len:200) 
        /// </sumary> 
        public const string FIELD_WarningBoard = "WarningBoard";
        /// <sumary> 
        /// (SpareTire Type:NVarChar Len:200) 
        /// </sumary> 
        public const string FIELD_SpareTire = "SpareTire";
        /// <sumary> 
        /// (Certificate Type:NVarChar Len:200) 
        /// </sumary> 
        public const string FIELD_Certificate = "Certificate";
        /// <sumary> 
        /// (Tools Type:NVarChar Len:200) 
        /// </sumary> 
        public const string FIELD_Tools = "Tools";
        /// <sumary> 
        /// (BusAppearance Type:NVarChar Len:200) 
        /// </sumary> 
        public const string FIELD_BusAppearance = "BusAppearance";
        /// <sumary> 
        /// (CoolingLiquid Type:NVarChar Len:200) 
        /// </sumary> 
        public const string FIELD_CoolingLiquid = "CoolingLiquid";
        /// <sumary> 
        /// (Others Type:NVarChar Len:200) 
        /// </sumary> 
        public const string FIELD_Others = "Others";
        /// <sumary> 
        /// (Improvements Type:NVarChar Len:200) 
        /// </sumary> 
        public const string FIELD_Improvements = "Improvements";
        /// <sumary> 
        /// (RecAcct Type:VarChar Len:20) 
        /// </sumary> 
        public const string FIELD_RecAcct = "RecAcct";
        /// <sumary> 
        /// (RecDate Type:SmallDateTime Len:0) 
        /// </sumary> 
        public const string FIELD_RecDate = "RecDate";
        /// <sumary> 
        /// (RecDivID Type:VarChar Len:20) 
        /// </sumary> 
        public const string FIELD_RecDivID = "RecDivID";
        /// <sumary> 
        /// (Void Type:Bit Len:0) 
        /// </sumary> 
        public const string FIELD_Void = "Void";
        /// <sumary> 
        /// (VoidAcct Type:VarChar Len:20) 
        /// </sumary> 
        public const string FIELD_VoidAcct = "VoidAcct";
        /// <sumary> 
        /// (VoidDate Type:SmallDateTime Len:0) 
        /// </sumary> 
        public const string FIELD_VoidDate = "VoidDate";
        /// <sumary> 
        /// (UserAcct Type:VarChar Len:20) 
        /// </sumary> 
        public const string FIELD_UserAcct = "UserAcct";
        /// <sumary> 
        /// (LastUpdateDate Type:SmallDateTime Len:0) 
        /// </sumary> 
        public const string FIELD_LastUpdateDate = "LastUpdateDate";
        #endregion --Field--

        #region --Property--
        private int _recid;
        private string _docid;
        private string _busid;
        private string _checkby;
        private DateTime _checkdate;
        private string _steeringwheel;
        private string _brake;
        private string _lamplight;
        private string _tyre;
        private string _loudspeaker;
        private string _machinefitter;
        private string _wiper;
        private string _extinguisher;
        private string _warningboard;
        private string _sparetire;
        private string _certificate;
        private string _tools;
        private string _busappearance;
        private string _coolingliquid;
        private string _others;
        private string _improvements;
        private string _recacct;
        private DateTime _recdate;
        private string _recdivid;
        private bool _void;
        private string _voidacct;
        private DateTime _voiddate;
        private string _useracct;
        private DateTime _lastupdatedate;

        /// <sumary> 
        /// (RecID Type:Int Len:0) 
        /// </sumary> 
        public int RecID
        {
            set { _recid = value; }
            get { return _recid; }
        }

        /// <sumary> 
        /// (DocID Type:VarChar Len:20) 
        /// </sumary> 
        public string DocID
        {
            set { _docid = value; }
            get { return _docid; }
        }

        /// <sumary> 
        /// (BusID Type:VarChar Len:20) 
        /// </sumary> 
        public string BusID
        {
            set { _busid = value; }
            get { return _busid; }
        }

        /// <sumary> 
        /// (CheckBy Type:VarChar Len:20) 
        /// </sumary> 
        public string CheckBy
        {
            set { _checkby = value; }
            get { return _checkby; }
        }

        /// <sumary> 
        /// (CheckDate Type:SmallDateTime Len:0) 
        /// </sumary> 
        public DateTime CheckDate
        {
            set { _checkdate = value; }
            get { return _checkdate; }
        }

        /// <sumary> 
        /// (SteeringWheel Type:NVarChar Len:200) 
        /// </sumary> 
        public string SteeringWheel
        {
            set { _steeringwheel = value; }
            get { return _steeringwheel; }
        }

        /// <sumary> 
        /// (Brake Type:NVarChar Len:200) 
        /// </sumary> 
        public string Brake
        {
            set { _brake = value; }
            get { return _brake; }
        }

        /// <sumary> 
        /// (Lamplight Type:NVarChar Len:200) 
        /// </sumary> 
        public string Lamplight
        {
            set { _lamplight = value; }
            get { return _lamplight; }
        }

        /// <sumary> 
        /// (Tyre Type:NVarChar Len:200) 
        /// </sumary> 
        public string Tyre
        {
            set { _tyre = value; }
            get { return _tyre; }
        }

        /// <sumary> 
        /// (LoudSpeaker Type:NVarChar Len:200) 
        /// </sumary> 
        public string LoudSpeaker
        {
            set { _loudspeaker = value; }
            get { return _loudspeaker; }
        }

        /// <sumary> 
        /// (MachineFitter Type:NVarChar Len:200) 
        /// </sumary> 
        public string MachineFitter
        {
            set { _machinefitter = value; }
            get { return _machinefitter; }
        }

        /// <sumary> 
        /// (Wiper Type:NVarChar Len:200) 
        /// </sumary> 
        public string Wiper
        {
            set { _wiper = value; }
            get { return _wiper; }
        }

        /// <sumary> 
        /// (Extinguisher Type:NVarChar Len:200) 
        /// </sumary> 
        public string Extinguisher
        {
            set { _extinguisher = value; }
            get { return _extinguisher; }
        }

        /// <sumary> 
        /// (WarningBoard Type:NVarChar Len:200) 
        /// </sumary> 
        public string WarningBoard
        {
            set { _warningboard = value; }
            get { return _warningboard; }
        }

        /// <sumary> 
        /// (SpareTire Type:NVarChar Len:200) 
        /// </sumary> 
        public string SpareTire
        {
            set { _sparetire = value; }
            get { return _sparetire; }
        }

        /// <sumary> 
        /// (Certificate Type:NVarChar Len:200) 
        /// </sumary> 
        public string Certificate
        {
            set { _certificate = value; }
            get { return _certificate; }
        }

        /// <sumary> 
        /// (Tools Type:NVarChar Len:200) 
        /// </sumary> 
        public string Tools
        {
            set { _tools = value; }
            get { return _tools; }
        }

        /// <sumary> 
        /// (BusAppearance Type:NVarChar Len:200) 
        /// </sumary> 
        public string BusAppearance
        {
            set { _busappearance = value; }
            get { return _busappearance; }
        }

        /// <sumary> 
        /// (CoolingLiquid Type:NVarChar Len:200) 
        /// </sumary> 
        public string CoolingLiquid
        {
            set { _coolingliquid = value; }
            get { return _coolingliquid; }
        }

        /// <sumary> 
        /// (Others Type:NVarChar Len:200) 
        /// </sumary> 
        public string Others
        {
            set { _others = value; }
            get { return _others; }
        }

        /// <sumary> 
        /// (Improvements Type:NVarChar Len:200) 
        /// </sumary> 
        public string Improvements
        {
            set { _improvements = value; }
            get { return _improvements; }
        }

        /// <sumary> 
        /// (RecAcct Type:VarChar Len:20) 
        /// </sumary> 
        public string RecAcct
        {
            set { _recacct = value; }
            get { return _recacct; }
        }

        /// <sumary> 
        /// (RecDate Type:SmallDateTime Len:0) 
        /// </sumary> 
        public DateTime RecDate
        {
            set { _recdate = value; }
            get { return _recdate; }
        }

        /// <sumary> 
        /// (RecDivID Type:VarChar Len:20) 
        /// </sumary> 
        public string RecDivID
        {
            set { _recdivid = value; }
            get { return _recdivid; }
        }

        /// <sumary> 
        /// (Void Type:Bit Len:0) 
        /// </sumary> 
        public bool Void
        {
            set { _void = value; }
            get { return _void; }
        }

        /// <sumary> 
        /// (VoidAcct Type:VarChar Len:20) 
        /// </sumary> 
        public string VoidAcct
        {
            set { _voidacct = value; }
            get { return _voidacct; }
        }

        /// <sumary> 
        /// (VoidDate Type:SmallDateTime Len:0) 
        /// </sumary> 
        public DateTime VoidDate
        {
            set { _voiddate = value; }
            get { return _voiddate; }
        }

        /// <sumary> 
        /// (UserAcct Type:VarChar Len:20) 
        /// </sumary> 
        public string UserAcct
        {
            set { _useracct = value; }
            get { return _useracct; }
        }

        /// <sumary> 
        /// (LastUpdateDate Type:SmallDateTime Len:0) 
        /// </sumary> 
        public DateTime LastUpdateDate
        {
            set { _lastupdatedate = value; }
            get { return _lastupdatedate; }
        }

        #endregion --Property--

        #region --New--
        /// <summary>
        /// Constructed Function
        /// </summary>
        public BusDailyChecking()
        {
            Init();
        }
        /// <summary>
        /// Constructed Function
        /// </summary>
        /// <param name="dr">DataRow</param>
        public BusDailyChecking(DataRow dr)
        {
            Init();
            SetModel(dr);
        }
        /// <summary>
        /// Constructed Function
        /// </summary>
        /// <param name="dt">DataTable</param>
        public BusDailyChecking(DataTable dt)
        {
            Init();
            SetModel(dt);
        }
        #endregion --New--

        #region --Private--
        /// <summary>
        /// Init The Private variable
        /// </summary>
        private void Init()
        {
            _recid = 0;
            _docid = string.Empty;
            _busid = string.Empty;
            _checkby = string.Empty;
            _checkdate = DateTime.MinValue;
            _steeringwheel = string.Empty;
            _brake = string.Empty;
            _lamplight = string.Empty;
            _tyre = string.Empty;
            _loudspeaker = string.Empty;
            _machinefitter = string.Empty;
            _wiper = string.Empty;
            _extinguisher = string.Empty;
            _warningboard = string.Empty;
            _sparetire = string.Empty;
            _certificate = string.Empty;
            _tools = string.Empty;
            _busappearance = string.Empty;
            _coolingliquid = string.Empty;
            _others = string.Empty;
            _improvements = string.Empty;
            _recacct = string.Empty;
            _recdate = DateTime.MinValue;
            _recdivid = string.Empty;
            _void = false;
            _voidacct = string.Empty;
            _voiddate = DateTime.MinValue;
            _useracct = string.Empty;
            _lastupdatedate = DateTime.MinValue;
        }
        /// <summary>
        /// SetModel By DataRow
        /// </summary>
        /// <param name="dr">DataRow</param>
        /// <returns>BusDailyChecking</returns>
        private BusDailyChecking SetModel(DataRow dr)
        {
            _recid = StrHelper.GetIntValue(dr[FIELD_RecID]);
            _docid = StrHelper.GetStringValue(dr[FIELD_DocID]);
            _busid = StrHelper.GetStringValue(dr[FIELD_BusID]);
            _checkby = StrHelper.GetStringValue(dr[FIELD_CheckBy]);
            _checkdate = StrHelper.GetDateTimeValue(dr[FIELD_CheckDate]);
            _steeringwheel = StrHelper.GetStringValue(dr[FIELD_SteeringWheel]);
            _brake = StrHelper.GetStringValue(dr[FIELD_Brake]);
            _lamplight = StrHelper.GetStringValue(dr[FIELD_Lamplight]);
            _tyre = StrHelper.GetStringValue(dr[FIELD_Tyre]);
            _loudspeaker = StrHelper.GetStringValue(dr[FIELD_LoudSpeaker]);
            _machinefitter = StrHelper.GetStringValue(dr[FIELD_MachineFitter]);
            _wiper = StrHelper.GetStringValue(dr[FIELD_Wiper]);
            _extinguisher = StrHelper.GetStringValue(dr[FIELD_Extinguisher]);
            _warningboard = StrHelper.GetStringValue(dr[FIELD_WarningBoard]);
            _sparetire = StrHelper.GetStringValue(dr[FIELD_SpareTire]);
            _certificate = StrHelper.GetStringValue(dr[FIELD_Certificate]);
            _tools = StrHelper.GetStringValue(dr[FIELD_Tools]);
            _busappearance = StrHelper.GetStringValue(dr[FIELD_BusAppearance]);
            _coolingliquid = StrHelper.GetStringValue(dr[FIELD_CoolingLiquid]);
            _others = StrHelper.GetStringValue(dr[FIELD_Others]);
            _improvements = StrHelper.GetStringValue(dr[FIELD_Improvements]);
            _recacct = StrHelper.GetStringValue(dr[FIELD_RecAcct]);
            _recdate = StrHelper.GetDateTimeValue(dr[FIELD_RecDate]);
            _recdivid = StrHelper.GetStringValue(dr[FIELD_RecDivID]);
            //_void = StrHelper.GetBoolValue(dr[FIELD_Void]);
            //_voidacct = StrHelper.GetStringValue(dr[FIELD_VoidAcct]);
            //_voiddate = StrHelper.GetDateTimeValue(dr[FIELD_VoidDate]);
            _useracct = StrHelper.GetStringValue(dr[FIELD_UserAcct]);
            _lastupdatedate = StrHelper.GetDateTimeValue(dr[FIELD_LastUpdateDate]);
            return this;
        }
        /// <summary>
        /// SetModel By DataTable
        /// </summary>
        /// <param name="dt">DataTable</param>
        /// <returns>BusDailyChecking</returns>
        private BusDailyChecking SetModel(DataTable dt)
        {
            foreach (DataRow dr in dt.Rows)
            {
                SetModel(dr);
                break;
            }
            return this;
        }
        #endregion --Private--

    }
}



